package com.cqust.junit.xmlTest;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

public class XmlTest {
    public static void main(String[] args) {
        ApplicationContext ac=new ClassPathXmlApplicationContext("applicationContext.xml");
        JdbcTemplate jdbcTemplate= (JdbcTemplate) ac.getBean("jdbcTemplate");
//        String sql="insert into student(sno,name,age,major) values ('2020444229','彭竹庚',22,'软件工程')";
        String sql="update student set name='彭竹庚' where sno='2020444229'";
        jdbcTemplate.execute(sql);
    }
}
